package com.fcscs.ecms.gwt.server;

import java.util.List;

import com.fcscs.core.gwt.server.FcsRemoteServiceServlet;
import com.fcscs.core.system.ApplicationContextHolder;
import com.fcscs.cservice.domain.Restaurant;
import com.fcscs.cservice.domain.model.RestaurantView;
import com.fcscs.ecms.gwt.client.ECMSRestaurantService;
import com.fcscs.ecms.service.ECMSRestaurantManager;

public class ECMSRestaurantServiceImpl extends FcsRemoteServiceServlet implements ECMSRestaurantService{

	/**
	 * 
	 */
	private static final long serialVersionUID = 264601757603675279L;

	private ECMSRestaurantManager restaMgr = (ECMSRestaurantManager) 
									ApplicationContextHolder.getBeanFromContext("ecmsRestaurantManager");
	
	@Override
	public Restaurant getRestaurant(long id) {
		return restaMgr.getRestaurant(id);
	}

	@Override
	public List<Restaurant> getRestaurantList(long orgId, long propId,boolean isCurrent) {
		return restaMgr.getRestaurantList(orgId, propId, isCurrent);
	}

	@Override
	public List<Restaurant> getRestaurantList(long orgId, long propId,long versionId) {
		return restaMgr.getRestaurantList(orgId, propId, versionId);
	}

	@Override
	public List<Restaurant> saveRestaurantList(List<Restaurant> restList) {
		return restaMgr.saveRestaurantList(restList);
	}

	@Override
	public Restaurant createRestaurant(Restaurant rest) {
		return restaMgr.createRestaurant(rest);
	}

	@Override
	public Restaurant saveRestaurant(Restaurant rest) {
		return restaMgr.saveRestaurant(rest);
	}

	@Override
	public boolean deleteRestaurant(Restaurant rest) {
		return restaMgr.deleteRestaurant(rest);
	}

	@Override
	public boolean permDeleteRestaurant(Restaurant rest) {
		return restaMgr.permDeleteRestaurant(rest);
	}

	@Override
	public boolean isRestaurantTaken(long orgId, long propId, String name,Long id, long versionId) {
		return restaMgr.isRestaurantTaken(orgId, propId, name, id, versionId);
	}

	@Override
	public List<RestaurantView> getRestaurantViewList(long orgId, long propId) {
		return restaMgr.getRestaurantViewList(orgId, propId);
	}

}
